package com.region.http.client.plugins;

import com.region.common.utils.ReflectUtils;
import com.region.plugin.Interceptor;
import com.region.plugin.ProceedPoint;

import java.util.Date;

/**
 * @author 26225
 * @date 2023/9/2 23:50
 * @description
 */
public class PrintUrlInterceptor implements Interceptor {
    @Override
    public Object proceed(ProceedPoint proceed) throws Throwable {
        Object[] args = (Object[]) ReflectUtils.getFieldValueByObject("args", proceed);
        System.out.println(new Date() + ",request url:" + args[0]);
        return Interceptor.super.proceed(proceed);
    }

}
